<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>斐波那契数列</title>
	</head>
	<body>
		请输入数列上限:<input type="text" id="txtTop" value="20" /> <input type="button" value="计算数列" onclick="fabric()" />
		<script type="text/javascript">
			function fabric(){
				var top = parseInt(document.getElementById('txtTop').value);
				for(var i=0,j=0; i<top;){
					document.write(j + ",");
				}
				
			}
		</script>
	</body>
</html>
